package DesignPattern.Proxy.Observer;

/**
 * @Author: Jun
 * @Date: 2018/9/28 21:54
 */
public class ObserverDemo {
    public static void main(String[] args) {
        ProductList observable=ProductList.getInstance();
        TaoBaoObserver taoBaoObserver=new TaoBaoObserver();
        JingDongObserver jingDongObserver=new JingDongObserver();
        observable.addObserver(jingDongObserver);
        observable.addObserver(taoBaoObserver);
        observable.addProduct("产品1");
    }
}
